package Services

//声明一个接口
type IGetUserService interface {
	GetUserName(uid int) string
	UpdateUser(uid int) string
	DelUser(uid int) string
	AddUser(uid int) string
}

//声明一个接口 也可以叫类
type UserService struct{}

//查询
func (this UserService) GetUserName(uid int) string {

	if uid == 100 {

		return "菜鸡飞"
	}

	return "胖虎"

}

//写入
func (this UserService) AddUser(uid int) string {

	return "写入成功"

}

//编辑
func (this UserService) UpdateUser(uid int) string {

	return "编辑成功"

}

//删除
func (this UserService) DelUser(uid int) string {

	return "删除成功"

}
